<template>
  <div class="infroMain">
    <div class="close" @click="closeInfo"></div>
    <div class="info">
      <div class="title">{{ content.swTitle }}</div>
      <div class="inm" v-html="content.swContent"></div>
    </div>
  </div>
</template>

<script>
import { swOne } from "network/sy";
export default {
  data() {
    return {
      content: {
        swTitle: "",
        swContent: "",
      },
    };
  },

  created() {},

  methods: {
    closeInfo() {
      this.$emit("closeInfo");
    },
    async showInfor(id) {
      let content = await swOne(id);
      this.content = {
        swTitle: content.result.swTitle,
        swContent: content.result.swContent,
      };
    },
  },
};
</script>

<style lang="scss" scoped>
.infroMain {
  width: 87.125rem;
  height: 46.25rem;
  background: url(~assets/img/sy/swbg.png) no-repeat;
  background-size: 100% 100%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1234;
  padding: 1.875rem;
  .close {
    position: absolute;
    right: 1.25rem;
    top: 1.25rem;
    background: url(~assets/img/sy/close.png) no-repeat;
    background-size: 100% 100%;
    width: 1.875rem;
    height: 1.875rem;
    color: #fff;
    cursor: pointer;
  }
  .info {
    width: 100%;
    height: 100%;
    color: #fff;
    font-size: 1.25rem;
    .title {
      font-size: 1.875rem;
      text-align: center;
    }
    .inm {
      margin-top: 1.25rem;
      height: 37.5rem;
      overflow: auto;
      /deep/ P {
        margin: 0;
        line-height: 1.875rem;
      }
    }
  }
}
</style>